"""
计算子字符串在字符串中的次数
"""
from pip._vendor.distlib.compat import raw_input

if __name__ == '__main__':
	str1 = raw_input('input a string:\n')
	str2 = raw_input('input a sub string:\n')
	ncount = str1.count(str2)
	print(ncount)
